package work;

import book.Booklist;

public class BorrowBook implements  Iwork{
    public void work(Booklist booklist){
            int pos = Input.input(booklist);
        if(pos>=0) {
            if (booklist.getBook(pos).isStatus()) {
                System.out.println("该图书已被借阅，请下次再来");
            } else {
                booklist.getBook(pos).setStatus(true);
                System.out.println("借阅成功，请及时归还！");
            }
        }
    }
}
